package com.hong.service_product.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hong.fy_common_commomutil.common.result.Result;
import com.hong.fy_model.model.product.ProductEntity;
import com.hong.fy_model.vo.productVO.ProductAndModelVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 
 *
 * @author wqh
 * @email 1601709391@qq.com
 * @date 2022-06-15 20:37:30
 */
public interface ProductService extends IService<ProductEntity> {

    //新增商品接口
     Boolean addProduct( ProductEntity product);

    //根据商品ID逻辑删除商品
     Boolean deleteProduct(Integer id);

    //更新商品
     Boolean updateProduct( ProductEntity product);

    //查询分页数据
     IPage<ProductEntity> findListByPage(Integer pageNum, Integer limit);

    //根据商品ID查询商品
     ProductEntity getProductById( Integer id);

    //根据商品类别分页查询商品
    IPage<ProductEntity> getByCategoryId(Integer categoryId, Integer pageNum, Integer limit);

     //上传商品图片，还涉及oss模块，so未写完
     Result upload( ProductEntity product);


}

